package org.example.springioc03;

import org.apache.catalina.core.ApplicationContext;
import org.example.springioc03.Controller.HelloController;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.interceptor.AbstractFallbackCacheOperationSource;

@SpringBootApplication
public class SpringIoc03Application {

    public static void main(String[] args) {
        ApplicationContext context = (ApplicationContext) SpringApplication.run(SpringIoc03Application.class, args);
        HelloController bean = context.getBean(HelloController.class);
        bean.sayHi();

        HelloController helloController = (HelloController) context.getBean(HelloController.class);

    }

}
